package com.atzly.community.service;

import com.atzly.community.entity.DiscussPost;
import org.springframework.data.domain.Page;

/**  es搜索服务
 * @author zlysimida
 * @date 2021/9/2 - 8:03
 */

public interface ElastaticSearchService {

    // 向es中添加数据
    public void addEntityToEs(DiscussPost post);

    // 从es中移除数据
    public void removeEntityFromEs(int id);

//    // 从es中进行搜索
//    public Map<String,Object> searchFromEs(String keyword, int offset, int limit);

    Page<DiscussPost> searchDiscussPost(String keyword, int i, int limit);
}
